package com.easylinkin.linkappapi.grid.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.grid.entity.GridReportWeek;
import com.easylinkin.linkappapi.grid.entity.GridReportWeekDetail;
import com.easylinkin.linkappapi.grid.entity.GridReportWeekUser;
import com.easylinkin.linkappapi.grid.models.vo.GridReportWeekUserInfoVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 网格周报人员指定表 服务类
 *
 * @author kuyujie
 * @since 2024-05-20
 */
public interface IGridReportWeekUserService extends IService<GridReportWeekUser> {
    /**
     * 保存数据
     *
     * @param gridReportWeek
     * @param userIdList
     * @author kyj
     * @date 2024/5/17 10:45
     */
    boolean saveData(GridReportWeek gridReportWeek, List<String> userIdList);

    /**
     * 根据周报id查询填报人员
     *
     * @param reportId
     * @return List<GridReportWeekUserInfoVO>
     * @author kyj
     * @date 2024/5/17 19:09
     */
    List<GridReportWeekUserInfoVO> listByReportId(Long reportId, LocalDateTime submitDeadline);

    /**
     * 根据周报id用户id获取填报人
     *
     * @param reportId
     * @param userId
     * @return GridReportDay
     * @author kyj
     * @date 2024/5/21 11:32
     */
    GridReportWeekUser getByReportIdUserId(Long reportId, String userId);

    /**
     * 填报时间更新
     *
     * @param reportWeekDetail
     * @return boolean
     * @author kyj
     * @date 2024/5/21 11:49
     */
    boolean updateSubmit(GridReportWeekDetail reportWeekDetail);

}